package net.ericaro.neojavagen.blocks ;
import net.ericaro.neojavagen.expressions.Expression;
import net.ericaro.neojavagen.blocks.StatementWithoutTrailingSubstatement;
import net.ericaro.neojavagen.blocks.Block ;

/**
* *<pre> SynchronizedStatement :
    synchronized ( Expression ) Block
</pre>
*/
public class SynchronizedStatement  implements StatementWithoutTrailingSubstatement {

Expression expression;
Block block ;

public SynchronizedStatement( Expression expression, Block block ){
	this.expression = expression; this.block = block ;
	}


public String toString(){
	StringBuilder stringbuilder = new StringBuilder();
	stringbuilder.append( "synchronized" ).append(" ");
stringbuilder.append( "(" ).append(" ");
stringbuilder.append( this.expression ).append(" ");
stringbuilder.append( ")" ).append(" ");
stringbuilder.append( this.block ).append(" ") ;
	return stringbuilder.toString();
}

}
